#ifndef _OCPP_VolumeOptions_H__
#define _OCPP_VolumeOptions_H__

#include "VolumeWriter.h"
#include "OCMain/Rectangle.h"

namespace OCPP
{
	namespace Volume
	{

		class _volumeExport VolumeOptions
		{
		public:
			struct _volumeExport Config
			{
				static const String NameFillValue;
				static const String NameWriter;
				static const String NameOutputPath;
				static const String NameGZipCompress;
				static const String NameMakeDirForFile;
				static const String NameDimSeperator;
				static const String NameEncodeRange;
				static const String NameClipRange;
				static const String NameClipRangeLevel;
				static const String NameReverseY;
				static const String NameReverseZ;
				static const String NameFixValue;
				static const String NameGenerateNormal;
				static const String NameIsoValues;

				static const String ValueD3Writer;
				static const String ValueJsonWriter;
			};

			VolumeOptions();
			VolumeOptions(const VolumeOptions& other);
			VolumeOptions(VolumeWriter* writer);
			VolumeOptions(const StringMap& config, VolumeWriter* writer = NULL);

			void setWriter(VolumeWriter* writer);
			VolumeWriter& getWriter() const;
			VolumeWriter& getWriter();

			StringVector nameDimX;
			StringVector nameDimY;
			StringVector nameDimZ;
			StringVector nameDimT;

			bool preferHalfFloat = true;
			bool absoluteValue = false;
			bool knownNotLonLat = false;
			bool knownIsPositive = false;
			bool customReverseZ = false;
			bool customFindLonLat = false;
			String knownLevelUnits = "";
			std::optional<Cesium::Rectangle> customClipExtent;

			std::optional<float> customScaler;
			std::optional<float> knownMinLevelIndex;
			std::optional<float> knownMaxLevelIndex;
			
			std::optional<float> customMinValue;
			std::optional<float> customMaxValue;

			//deprecate
			std::optional<bool> reverseY;
			std::optional<bool> reverseZ; //deprecate
			std::optional<CRectangle> clipRect;
			std::optional<Vector2i> clipLevelRange;
		private:
			std::shared_ptr<VolumeWriter> ncWriter;
		};
	}
}


#endif // !_OCPP_NcOptions_H__
